from django.forms import ModelForm
from django.contrib.auth.models import User
from .models import UserProfile
from django.forms.models import inlineformset_factory

class UserUpdateForm(ModelForm):
	class Meta:
		model = User
		fields = ['first_name', 'last_name']

class UserProfileUpdateForm(ModelForm):
	class Meta:
		model = UserProfile
		fields = ['age', 'phone', 'desc', 'icon']

FullUserUpdateFormSet = inlineformset_factory(User, UserProfile, fields=('age', 'phone', 'desc', 'icon'))